/**
 * @file objdat.h
 *
 * Interface of all object data.
 */
#pragma once

#include <cstdint>

#include "gendung.h"

namespace devilution {

enum theme_id : int8_t {
	THEME_BARREL,
	THEME_SHRINE,
	THEME_MONSTPIT,
	THEME_SKELROOM,
	THEME_TREASURE,
	THEME_LIBRARY,
	THEME_TORTURE,
	THEME_BLOODFOUNTAIN,
	THEME_DECAPITATED,
	THEME_PURIFYINGFOUNTAIN,
	THEME_ARMORSTAND,
	THEME_GOATSHRINE,
	THEME_CAULDRON,
	THEME_MURKYFOUNTAIN,
	THEME_TEARFOUNTAIN,
	THEME_BRNCROSS,
	THEME_WEAPONRACK,
	THEME_NONE = -1,
};

enum object_graphic_id : int8_t {
	OFILE_L1BRAZ,
	OFILE_L1DOORS,
	OFILE_LEVER,
	OFILE_CHEST1,
	OFILE_CHEST2,
	OFILE_BANNER,
	OFILE_SKULPILE,
	OFILE_SKULFIRE,
	OFILE_SKULSTIK,
	OFILE_CRUXSK1,
	OFILE_CRUXSK2,
	OFILE_CRUXSK3,
	OFILE_BOOK1,
	OFILE_BOOK2,
	OFILE_ROCKSTAN,
	OFILE_ANGEL,
	OFILE_CHEST3,
	OFILE_BURNCROS,
	OFILE_CANDLE2,
	OFILE_NUDE2,
	OFILE_SWITCH4,
	OFILE_TNUDEM,
	OFILE_TNUDEW,
	OFILE_TSOUL,
	OFILE_L2DOORS,
	OFILE_WTORCH4,
	OFILE_WTORCH3,
	OFILE_SARC,
	OFILE_FLAME1,
	OFILE_PRSRPLT1,
	OFILE_TRAPHOLE,
	OFILE_MINIWATR,
	OFILE_WTORCH2,
	OFILE_WTORCH1,
	OFILE_BCASE,
	OFILE_BSHELF,
	OFILE_WEAPSTND,
	OFILE_BARREL,
	OFILE_BARRELEX,
	OFILE_LSHRINEG,
	OFILE_RSHRINEG,
	OFILE_BLOODFNT,
	OFILE_DECAP,
	OFILE_PEDISTL,
	OFILE_L3DOORS,
	OFILE_PFOUNTN,
	OFILE_ARMSTAND,
	OFILE_GOATSHRN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KCASEL,
	OBJ_BOOKCASER,
	OBJ_BOOKSTAND,
	OBJ_BOOKCANDLE,
	OBJ_BLOODFTN,
	OBJ_DECAP,
	OBJ_TCHEST1,
	OBJ_TCHEST2,
	OBJ_TCHEST3,
	OBJ_BLINDBOOK,
	OBJ_BLOODBOOK,
	OBJ_PEDISTAL,
	OBJ_L3LDOOR,
	OBJ_L3RDOOR,
	OBJ_PURIFYINGFTN,
	OBJ_ARMORSTAND,
	OBJ_ARMORSTANDN,
	OBJ_GOATSHRINE,
	OBJ_CAULDRON,
	OBJ_MURKYFTN,
	OBJ_TEARFTN,
	OBJ_ALTBOY,
	OBJ_MCIRCLE1,
	OBJ_MCIRCLE2,
	OBJ_STORYBOOK,
	OBJ_STORYCANDLE,
	OBJ_STEELTOME,
	OBJ_WARARMOR,
	OBJ_WARWEAP,
	OBJ_TBCROSS,
	OBJ_WEAPONRACK,
	OBJ_WEAPONRACKN,
	OBJ_MUSHPATCH,
	OBJ_LAZSTAND,
	OBJ_SLAINHERO,
	OBJ_SIGNCHEST,
	OBJ_BOOKSHELFR,
	OBJ_NULL = -1,
};

enum quest_id : int8_t {
	Q_ROCK,
	Q_MUSHROOM,
	Q_GARBUD,
	Q_ZHAR,
	Q_VEIL,
	Q_DIABLO,
	Q_BUTCHER,
	Q_LTBANNER,
	Q_BLIND,
	Q_BLOOD,
	Q_ANVIL,
	Q_WARLORD,
	Q_SKELKING,
	Q_PWATER,
	Q_SCHAMB,
	Q_BETRAYER,
	Q_GRAVE,
	Q_FARMER,
	Q_GIRL,
	Q_TRADER,
	Q_DEFILER,
	Q_NAKRUL,
	Q_CORNSTN,
	Q_JERSEY,
	Q_INVALID = -1,
};

struct ObjDataStruct {
	int oload; // Todo create enum
	object_graphic_id ofindex;
	int8_t ominlvl;
	int8_t omaxlvl;
	dungeon_type olvltype;
	theme_id otheme;
	quest_id oquest;
	int oAnimFlag;  // TODO Create enum
	int oAnimDelay; // Tick length of each frame in the current animation
	int oAnimLen;   // Number of frames in current animation
	int oAnimWidth;
	bool oSolidFlag;
	bool oMissFlag;
	bool oLightFlag;
	int8_t oBreak;   // TODO Create enum
	int8_t oSelFlag; // TODO Create enum
	bool oTrapFlag;
};

extern const _object_id ObjTypeConv[];
extern const ObjDataStruct AllObjects[];
extern const char *const ObjMasterLoadList[];
extern const char *ObjCryptLoadList[];
extern const char *ObjHiveLoadList[];

} // namespace devilution
